<?php 
$show_validator = true;
include TMPL_PATH.'public/header.phtml';
?>
<script type="text/javascript">
  $(document).ready(function() {
	$.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
	$("#realname").formValidator({onshow:"请输入真实姓名",onfocus:"真实姓名应该为2-20位之间"}).inputValidator({min:2,max:20,onerror:"真实姓名应该为2-20位之间"})
	$("#email").formValidator({onshow:"请输入E-mail",onfocus:"请输入E-mail",oncorrect:"E-mail格式正确"}).regexValidator({regexp:"email",datatype:"enum",onerror:"E-mail格式错误"}).ajaxValidator({
	    type : "get",
		url : "<?php echo U('manage/public_email_ajx')?>",
		data :"",
		datatype : "html",
		async:'false',
		success : function(data){
            if( data == "1" )
			{
                return true;
			}
            else
			{
                return false;
			}
		},
		buttons: $("#dosubmit"),
		onerror : "该邮箱已经存在",
		onwait : "请稍候..."
	}).defaultPassed();
  })
</script>
<div class="subnav">
    <div class="content-menu ib-a blue line-x">
            </div>
</div>
<div class="pad_10">
<div class="common-form">
<form name="myform" action="<?php echo U('manage/public_edit_info');?>" method="post" id="myform">
<input type="hidden" name="info[id]" value="<?php echo $user['id'];?>" />
<input type="hidden" name="info[username]" value="<?php echo $user['username'];?>" />
<table width="100%" class="table_form contentWrap">
<tr>
<th width="100">用户名：</th> 
<td><?php echo $user['username'];?></td>
</tr>

<tr>
<th>最后登录时间：</th> 
<td><?php echo date('Y-m-d H:i:s',$user['lastlogintime']);?></td>
</tr>

<tr>
<th>最后登录IP：</th> 
<td><?php echo $user['lastloginip'];?></td>
</tr>

<tr>
<th>真实姓名：</th>
<td>
<input type="text" name="info[realname]" id="realname" class="input-text" size="30" value="<?php echo $user['realname'];?>" />
</td>
</tr>
<tr>
<th>E-mail：</th>
<td>
<input type="text" name="info[email]" id="email" class="input-text" size="40" value="<?php echo $user['email'];?>" />
</td>
</tr>
</table>

    <div class="bk15"></div>
    <input name="dosubmit" type="submit" value="提交" class="button" id="dosubmit" />
</form>
</div>
</div>
</body>
</html>